import Cookies from 'js-cookie';

const TokenKey = 'mimiva-token';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function setNickname(nickname) {
  return Cookies.set('nickname', nickname);
}

export function getNickname() {
  return Cookies.get('nickname');
}

export function removeNickname() {
  return Cookies.remove('nickname');
}
/**
 * 设置客户端签名
 */
export function setClient() {
  return Cookies.set('mimiva-client', Date.now());
}
/**
 * 拿取客户端签名
 */
export function getClient() {
  return Cookies.get('mimiva-client');
}
